home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / sidearms.c < prev    next >
C/C++ Source or Header  |  2000-05-25  |  32KB  |  842 lines

  1. /***************************************************************************
  2.  
  3.   Sidearms
  4.   ========
  5.  
  6.   Driver provided by Paul Leaman
  7.  
  8. TODO:
  9.   There is an additional ROM which seems to contain code for a third Z80,
  10.   however the board only has two. The ROM is related to the missing star
  11.   background. At one point, the code jumps to A000, outside of the ROM
  12.   address space.
  13.   This ROM could be something entirely different from Z80 code. In another
  14.   set, it consists of only the second half of the one we have here.
  15.  
  16. ***************************************************************************/
  17.  
  18. #include "driver.h"
  19. #include "vidhrdw/generic.h"
  20.  
  21. extern unsigned char *sidearms_bg_scrollx,*sidearms_bg_scrolly;
  22. extern unsigned char *sidearms_bg2_scrollx,*sidearms_bg2_scrolly;
  23.  
  24. WRITE_HANDLER( sidearms_c804_w );
  25. WRITE_HANDLER( sidearms_gfxctrl_w );
  26. int  sidearms_vh_start(void);
  27. void sidearms_vh_stop(void);
  28. void sidearms_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  29. void sidearms_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  30.  
  31.  
  32. static WRITE_HANDLER( sidearms_bankswitch_w )
  33. {
  34.     int bankaddress;
  35.     unsigned char *RAM = memory_region(REGION_CPU1);
  36.  
  37.  
  38.     /* bits 0 and 1 select the ROM bank */
  39.     bankaddress = 0x10000 + (data & 0x0f) * 0x4000;
  40.     cpu_setbank(1,&RAM[bankaddress]);
  41. }
  42.  
  43.  
  44. /* Turtle Ship input ports are rotated 90 degrees */
  45. static READ_HANDLER( turtship_ports_r )
  46. {
  47.     int i,res;
  48.  
  49.  
  50.     res = 0;
  51.     for (i = 0;i < 8;i++)
  52.         res |= ((readinputport(i) >> offset) & 1) << i;
  53.  
  54.     return res;
  55. }
  56.  
  57.  
  58. static struct MemoryReadAddress readmem[] =
  59. {
  60.     { 0x0000, 0x7fff, MRA_ROM },
  61.     { 0x8000, 0xbfff, MRA_BANK1 },
  62.     { 0xc800, 0xc800, input_port_0_r },
  63.     { 0xc801, 0xc801, input_port_1_r },
  64.     { 0xc802, 0xc802, input_port_2_r },
  65.     { 0xc803, 0xc803, input_port_3_r },
  66.     { 0xc804, 0xc804, input_port_4_r },
  67.     { 0xc805, 0xc805, input_port_5_r },
  68.     { 0xd000, 0xffff, MRA_RAM },
  69.     { -1 }  /* end of table */
  70. };
  71.  
  72. static struct MemoryWriteAddress writemem[] =
  73. {
  74.     { 0x0000, 0xbfff, MWA_ROM },
  75.     { 0xc000, 0xc3ff, paletteram_xxxxBBBBRRRRGGGG_split1_w, &paletteram },
  76.     { 0xc400, 0xc7ff, paletteram_xxxxBBBBRRRRGGGG_split2_w, &paletteram_2 },
  77.     { 0xc800, 0xc800, soundlatch_w },
  78.     { 0xc801, 0xc801, sidearms_bankswitch_w },
  79.     { 0xc802, 0xc802, watchdog_reset_w },
  80.     { 0xc804, 0xc804, sidearms_c804_w },
  81.     { 0xc805, 0xc805, MWA_RAM, &sidearms_bg2_scrollx },
  82.     { 0xc806, 0xc806, MWA_RAM, &sidearms_bg2_scrolly },
  83.     { 0xc808, 0xc809, MWA_RAM, &sidearms_bg_scrollx },
  84.     { 0xc80a, 0xc80b, MWA_RAM, &sidearms_bg_scrolly },
  85.     { 0xc80c, 0xc80c, sidearms_gfxctrl_w },    /* background and sprite enable */
  86.     { 0xd000, 0xd7ff, videoram_w, &videoram, &videoram_size },
  87.     { 0xd800, 0xdfff, colorram_w, &colorram },
  88.     { 0xe000, 0xefff, MWA_RAM },
  89.     { 0xf000, 0xffff, MWA_RAM, &spriteram, &spriteram_size },
  90.     { -1 }  /* end of table */
  91. };
  92.  
  93. #ifdef THIRD_CPU
  94. static WRITE_HANDLER( pop )
  95. {
  96. RAM[0xa000] = 0xc3;
  97. RAM[0xa001] = 0x00;
  98. RAM[0xa002] = 0xa0;
  99. //      interrupt_enable_w(offset,data & 0x80);
  100. }
  101.  
  102. static struct MemoryReadAddress readmem2[] =
  103. {
  104.     { 0x0000, 0x7fff, MRA_ROM },
  105.     { 0xc000, 0xdfff, MRA_RAM },
  106.     { 0xe000, 0xe3ff, MRA_RAM },
  107.     { 0xe400, 0xe7ff, MRA_RAM },
  108.     { 0xe800, 0xebff, MRA_RAM },
  109.     { 0xec00, 0xefff, MRA_RAM },
  110.     { -1 }  /* end of table */
  111. };
  112.  
  113. static struct MemoryWriteAddress writemem2[] =
  114. {
  115.     { 0x0000, 0x7fff, MWA_ROM },
  116.     { 0xc000, 0xdfff, MWA_RAM },
  117.     { 0xe000, 0xe3ff, MWA_RAM },
  118.     { 0xe400, 0xe7ff, MWA_RAM },
  119.     { 0xe800, 0xebff, MWA_RAM },
  120.     { 0xec00, 0xefff, MWA_RAM },
  121.     { 0xf80e, 0xf80e, pop },        /* ROM bank selector? (to appear at 8000) */
  122.     { -1 }  /* end of table */
  123. };
  124. #endif
  125.  
  126.  
  127. static struct MemoryReadAddress turtship_readmem[] =
  128. {
  129.     { 0x0000, 0x7fff, MRA_ROM },
  130.     { 0x8000, 0xbfff, MRA_BANK1 },
  131.     { 0xc000, 0xe7ff, MRA_RAM },
  132.     { 0xe800, 0xe807, turtship_ports_r },
  133.     { 0xf000, 0xffff, MRA_RAM },
  134.     { -1 }  /* end of table */
  135. };
  136.  
  137. static struct MemoryWriteAddress turtship_writemem[] =
  138. {
  139.     { 0x0000, 0xbfff, MWA_ROM },
  140.     { 0xc000, 0xcfff, MWA_RAM },
  141.     { 0xd000, 0xdfff, MWA_RAM, &spriteram, &spriteram_size },
  142.     { 0xe000, 0xe3ff, paletteram_xxxxBBBBRRRRGGGG_split1_w, &paletteram },
  143.     { 0xe400, 0xe7ff, paletteram_xxxxBBBBRRRRGGGG_split2_w, &paletteram_2 },
  144.     { 0xe800, 0xe800, soundlatch_w },
  145.     { 0xe801, 0xe801, sidearms_bankswitch_w },
  146.     { 0xe802, 0xe802, watchdog_reset_w },
  147.     { 0xe804, 0xe804, sidearms_c804_w },
  148.     { 0xe805, 0xe805, MWA_RAM, &sidearms_bg2_scrollx },
  149.     { 0xe806, 0xe806, MWA_RAM, &sidearms_bg2_scrolly },
  150.     { 0xe808, 0xe809, MWA_RAM, &sidearms_bg_scrollx },
  151.     { 0xe80a, 0xe80b, MWA_RAM, &sidearms_bg_scrolly },
  152.     { 0xe80a, 0xe80b, MWA_RAM, &sidearms_bg_scrolly },
  153.     { 0xe80c, 0xe80c, sidearms_gfxctrl_w },    /* background and sprite enable */
  154.     { 0xf000, 0xf7ff, videoram_w, &videoram, &videoram_size },
  155.     { 0xf800, 0xffff, colorram_w, &colorram },
  156.     { -1 }  /* end of table */
  157. };
  158.  
  159.  
  160. static struct MemoryReadAddress sound_readmem[] =
  161. {
  162.     { 0x0000, 0x7fff, MRA_ROM },
  163.     { 0xc000, 0xc7ff, MRA_RAM },
  164.     { 0xd000, 0xd000, soundlatch_r },
  165.     { 0xf000, 0xf000, YM2203_status_port_0_r },
  166.     { 0xf002, 0xf002, YM2203_status_port_1_r },
  167.     { -1 }  /* end of table */
  168. };
  169.  
  170. static struct MemoryWriteAddress sound_writemem[] =
  171. {
  172.     { 0x0000, 0x7fff, MWA_ROM },
  173.     { 0xc000, 0xc7ff, MWA_RAM },
  174.     { 0xf000, 0xf000, YM2203_control_port_0_w },
  175.     { 0xf001, 0xf001, YM2203_write_port_0_w },
  176.     { 0xf002, 0xf002, YM2203_control_port_1_w },
  177.     { 0xf003, 0xf003, YM2203_write_port_1_w },
  178.     { -1 }  /* end of table */
  179. };
  180.  
  181.  
  182. INPUT_PORTS_START( sidearms )
  183.     PORT_START      /* IN0 */
  184.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
  185.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
  186.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  187.     PORT_DIPNAME( 0x08, 0x08, "Freeze" )    /* I'm not sure it's really a dip switch */
  188.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  189.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  190.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  191.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  192.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
  193.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
  194.  
  195.     PORT_START      /* IN1 */
  196.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  197.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  198.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  199.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  200.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  201.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  202.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
  203.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  204.  
  205.     PORT_START      /* IN2 */
  206.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  207.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  208.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  209.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  210.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  211.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  212.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
  213.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  214.  
  215.     PORT_START      /* DSW0 */
  216.     PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) )
  217.     PORT_DIPSETTING(    0x07, "0 (Easiest)" )
  218.     PORT_DIPSETTING(    0x06, "1" )
  219.     PORT_DIPSETTING(    0x05, "2" )
  220.     PORT_DIPSETTING(    0x04, "3" )
  221.     PORT_DIPSETTING(    0x03, "4" )
  222.     PORT_DIPSETTING(    0x02, "5" )
  223.     PORT_DIPSETTING(    0x01, "6" )
  224.     PORT_DIPSETTING(    0x00, "7 (Hardest)" )
  225.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )
  226.     PORT_DIPSETTING(    0x08, "3" )
  227.     PORT_DIPSETTING(    0x00, "5" )
  228.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) )
  229.     PORT_DIPSETTING(    0x30, "100000" )
  230.     PORT_DIPSETTING(    0x20, "100000 100000" )
  231.     PORT_DIPSETTING(    0x10, "150000 150000" )
  232.     PORT_DIPSETTING(    0x00, "200000 200000" )
  233.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
  234.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  235.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  236.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  237.  
  238.     PORT_START      /* DSW1 */
  239.     PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
  240.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  241.     PORT_DIPSETTING(    0x01, DEF_STR( 3C_1C ) )
  242.     PORT_DIPSETTING(    0x02, DEF_STR( 2C_1C ) )
  243.     PORT_DIPSETTING(    0x07, DEF_STR( 1C_1C ) )
  244.     PORT_DIPSETTING(    0x06, DEF_STR( 1C_2C ) )
  245.     PORT_DIPSETTING(    0x05, DEF_STR( 1C_3C ) )
  246.     PORT_DIPSETTING(    0x04, DEF_STR( 1C_4C ) )
  247.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_6C ) )
  248.     PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) )
  249.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  250.     PORT_DIPSETTING(    0x08, DEF_STR( 3C_1C ) )
  251.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  252.     PORT_DIPSETTING(    0x38, DEF_STR( 1C_1C ) )
  253.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_2C ) )
  254.     PORT_DIPSETTING(    0x28, DEF_STR( 1C_3C ) )
  255.     PORT_DIPSETTING(    0x20, DEF_STR( 1C_4C ) )
  256.     PORT_DIPSETTING(    0x18, DEF_STR( 1C_6C ) )
  257.     PORT_DIPNAME( 0x40, 0x40, "Allow Continue" )
  258.     PORT_DIPSETTING(    0x00, DEF_STR( No ) )
  259.     PORT_DIPSETTING(    0x40, DEF_STR( Yes ) )
  260.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) )
  261.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  262.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  263.  
  264.     PORT_START      /* DSW2 */
  265.     PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
  266.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )     /* not sure, but likely */
  267. INPUT_PORTS_END
  268.  
  269. INPUT_PORTS_START( turtship )
  270.     PORT_START      /* IN0 */
  271.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
  272.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
  273.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  274.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  275.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  276.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 )
  277.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
  278.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
  279.  
  280.     PORT_START      /* IN1 */
  281.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  282.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  283.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  284.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  285.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  286.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  287.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
  288.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  289.  
  290.     PORT_START      /* IN2 */
  291.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  292.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  293.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  294.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  295.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  296.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  297.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
  298.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  299.  
  300.     PORT_START      /* DSW0 */
  301.     PORT_BITX( 0x01, 0x01, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", 0, IP_JOY_NONE )
  302.     PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
  303.     PORT_DIPSETTING( 0x00, DEF_STR( On ) )
  304.     PORT_DIPNAME( 0x02, 0x00, "Allow Continue" )
  305.     PORT_DIPSETTING(    0x02, DEF_STR( No ) )
  306.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  307.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  308.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  309.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  310.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Flip_Screen ) )
  311.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  312.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  313.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) )
  314.     PORT_DIPSETTING(    0x10, "Normal" )
  315.     PORT_DIPSETTING(    0x00, "Hard" )
  316.     PORT_DIPNAME( 0xe0, 0xa0, DEF_STR( Lives ) )
  317.     PORT_DIPSETTING(    0xe0, "1" )
  318.     PORT_DIPSETTING(    0x60, "2" )
  319.     PORT_DIPSETTING(    0xa0, "3" )
  320.     PORT_DIPSETTING(    0x20, "4" )
  321.     PORT_DIPSETTING(    0xc0, "5" )
  322.     PORT_DIPSETTING(    0x40, "6" )
  323.     PORT_DIPSETTING(    0x80, "7" )
  324.     PORT_DIPSETTING(    0x00, "8" )
  325.  
  326.     PORT_START      /* DSW1 */
  327.     PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
  328.     PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
  329.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  330.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  331.     PORT_DIPNAME( 0x0c, 0x08, DEF_STR( Bonus_Life ) )
  332.     PORT_DIPSETTING(    0x08, "Every 150000" )
  333.     PORT_DIPSETTING(    0x00, "Every 200000" )
  334.     PORT_DIPSETTING(    0x0c, "150000 only" )
  335.     PORT_DIPSETTING(    0x04, "200000 only" )
  336.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) )
  337.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  338.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  339.     PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coinage ) )
  340.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  341.     PORT_DIPSETTING(    0x80, DEF_STR( 3C_1C ) )
  342.     PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) )
  343.     PORT_DIPSETTING(    0xe0, DEF_STR( 1C_1C ) )
  344.     PORT_DIPSETTING(    0x60, DEF_STR( 1C_2C ) )
  345.     PORT_DIPSETTING(    0xa0, DEF_STR( 1C_3C ) )
  346.     PORT_DIPSETTING(    0x20, DEF_STR( 1C_4C ) )
  347.     /* 0xc0 1 Coin/1 Credit */
  348. INPUT_PORTS_END
  349.  
  350. INPUT_PORTS_START( dyger )
  351.     PORT_START      /* IN0 */
  352.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
  353.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* seems to be 1-player only */
  354.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  355.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  356.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  357.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  358.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
  359.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  360.  
  361.     PORT_START      /* IN1 */
  362.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  363.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  364.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  365.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  366.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  367.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  368.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
  369.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  370.  
  371.     PORT_START      /* IN2 */
  372.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* seems to be 1-player only */
  373.  
  374.     PORT_START      /* DSW0 */
  375.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  376.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  377.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  378.     PORT_DIPNAME( 0x02, 0x00, "Allow Continue" )
  379.     PORT_DIPSETTING(    0x02, DEF_STR( No ) )
  380.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  381.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  382.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  383.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  384.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Flip_Screen ) )
  385.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  386.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  387.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) )
  388.     PORT_DIPSETTING(    0x10, "Easy" )
  389.     PORT_DIPSETTING(    0x00, "Hard" )
  390.     PORT_DIPNAME( 0xe0, 0xa0, DEF_STR( Lives ) )
  391.     PORT_DIPSETTING(    0xe0, "1" )
  392.     PORT_DIPSETTING(    0x60, "2" )
  393.     PORT_DIPSETTING(    0xa0, "3" )
  394.     PORT_DIPSETTING(    0x20, "4" )
  395.     PORT_DIPSETTING(    0xc0, "5" )
  396.     PORT_DIPSETTING(    0x40, "6" )
  397.     PORT_DIPSETTING(    0x80, "7" )
  398.     PORT_DIPSETTING(    0x00, "8" )
  399.  
  400.     PORT_START      /* DSW1 */
  401.     PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
  402.     PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
  403.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  404.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  405.     PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Bonus_Life ) )
  406.     PORT_DIPSETTING(    0x04, "Every 150000" )
  407.     PORT_DIPSETTING(    0x00, "Every 200000" )
  408.     PORT_DIPSETTING(    0x0c, "150000 only" )
  409.     PORT_DIPSETTING(    0x08, "200000 only" )
  410.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
  411.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  412.     PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  413.     PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coinage ) )
  414.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  415.     PORT_DIPSETTING(    0x80, DEF_STR( 3C_1C ) )
  416.     PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) )
  417.     PORT_DIPSETTING(    0xe0, DEF_STR( 1C_1C ) )
  418.     PORT_DIPSETTING(    0x60, DEF_STR( 1C_2C ) )
  419.     PORT_DIPSETTING(    0xa0, DEF_STR( 1C_3C ) )
  420.     PORT_DIPSETTING(    0x20, DEF_STR( 1C_4C ) )
  421.     /* 0xc0 1 Coin/1 Credit */
  422. INPUT_PORTS_END
  423.  
  424.  
  425.  
  426. static struct GfxLayout charlayout =
  427. {
  428.     8,8,    /* 8*8 characters */
  429.     1024,   /* 1024 characters */
  430.     2,      /* 2 bits per pixel */
  431.     { 4, 0 },
  432.     { 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3 },
  433.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
  434.     16*8    /* every char takes 16 consecutive bytes */
  435. };
  436.  
  437. static struct GfxLayout spritelayout =
  438. {
  439.     16,16,  /* 16*16 sprites */
  440.     2048,   /* 2048 sprites */
  441.     4,      /* 4 bits per pixel */
  442.     { 2048*64*8+4, 2048*64*8+0, 4, 0 },
  443.     { 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3,
  444.             32*8+0, 32*8+1, 32*8+2, 32*8+3, 33*8+0, 33*8+1, 33*8+2, 33*8+3 },
  445.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
  446.             8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
  447.     64*8    /* every sprite takes 64 consecutive bytes */
  448. };
  449.  
  450. static struct GfxLayout tilelayout =
  451. {
  452.     32,32,  /* 32*32 tiles */
  453.     512,    /* 512 tiles */
  454.     4,      /* 4 bits per pixel */
  455.     { 512*256*8+4, 512*256*8+0, 4, 0 },
  456.     {
  457.         0,       1,       2,       3,       8+0,       8+1,       8+2,       8+3,
  458.         32*16+0, 32*16+1, 32*16+2, 32*16+3, 32*16+8+0, 32*16+8+1, 32*16+8+2, 32*16+8+3,
  459.         64*16+0, 64*16+1, 64*16+2, 64*16+3, 64*16+8+0, 64*16+8+1, 64*16+8+2, 64*16+8+3,
  460.         96*16+0, 96*16+1, 96*16+2, 96*16+3, 96*16+8+0, 96*16+8+1, 96*16+8+2, 96*16+8+3,
  461.     },
  462.     {
  463.         0*16,  1*16,  2*16,  3*16,  4*16,  5*16,  6*16,  7*16,
  464.         8*16,  9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16,
  465.         16*16, 17*16, 18*16, 19*16, 20*16, 21*16, 22*16, 23*16,
  466.         24*16, 25*16, 26*16, 27*16, 28*16, 29*16, 30*16, 31*16
  467.     },
  468.     256*8   /* every tile takes 256 consecutive bytes */
  469. };
  470.  
  471. static struct GfxDecodeInfo gfxdecodeinfo[] =
  472. {
  473.     { REGION_GFX1, 0, &charlayout,   768, 64 }, /* colors 768-1023 */
  474.     { REGION_GFX2, 0, &tilelayout,     0, 32 }, /* colors   0-511 */
  475.     { REGION_GFX3, 0, &spritelayout, 512, 16 }, /* colors 512-767 */
  476.     { -1 } /* end of array */
  477. };
  478.  
  479.  
  480.  
  481. static struct GfxLayout turtship_tilelayout =
  482. {
  483.     32,32,  /* 32*32 tiles */
  484.     768,    /* 768 tiles */
  485.     4,      /* 4 bits per pixel */
  486.     { 768*256*8+4, 768*256*8+0, 4, 0 },
  487.     {
  488.         0,       1,       2,       3,       8+0,       8+1,       8+2,       8+3,
  489.         32*16+0, 32*16+1, 32*16+2, 32*16+3, 32*16+8+0, 32*16+8+1, 32*16+8+2, 32*16+8+3,
  490.         64*16+0, 64*16+1, 64*16+2, 64*16+3, 64*16+8+0, 64*16+8+1, 64*16+8+2, 64*16+8+3,
  491.         96*16+0, 96*16+1, 96*16+2, 96*16+3, 96*16+8+0, 96*16+8+1, 96*16+8+2, 96*16+8+3,
  492.     },
  493.     {
  494.         0*16,  1*16,  2*16,  3*16,  4*16,  5*16,  6*16,  7*16,
  495.         8*16,  9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16,
  496.         16*16, 17*16, 18*16, 19*16, 20*16, 21*16, 22*16, 23*16,
  497.         24*16, 25*16, 26*16, 27*16, 28*16, 29*16, 30*16, 31*16
  498.     },
  499.     256*8   /* every tile takes 256 consecutive bytes */
  500. };
  501.  
  502. static struct GfxDecodeInfo turtship_gfxdecodeinfo[] =
  503. {
  504.     { REGION_GFX1, 0, &charlayout,          768, 64 },    /* colors 768-1023 */
  505.     { REGION_GFX2, 0, &turtship_tilelayout,   0, 32 },    /* colors   0-511 */
  506.     { REGION_GFX3, 0, &spritelayout,        512, 16 },    /* colors 512-767 */
  507.     { -1 } /* end of array */
  508. };
  509.  
  510. /* handler called by the 2203 emulator when the internal timers cause an IRQ */
  511. static void irqhandler(int irq)
  512. {
  513.     cpu_set_irq_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
  514. }
  515.  
  516. static struct YM2203interface ym2203_interface =
  517. {
  518.     2,                      /* 2 chips */
  519.     4000000,        /* 4 MHz ? (hand tuned) */
  520.     { YM2203_VOL(15,25), YM2203_VOL(15,25) },
  521.     { 0 },
  522.     { 0 },
  523.     { 0 },
  524.     { 0 },
  525.     { irqhandler }
  526. };
  527.  
  528.  
  529.  
  530. static struct MachineDriver machine_driver_sidearms =
  531. {
  532.     /* basic machine hardware */
  533.     {
  534.         {
  535.             CPU_Z80,
  536.             4000000,        /* 4 Mhz (?) */
  537.             readmem,writemem,0,0,
  538.             interrupt,1
  539.         },
  540.         {
  541.             CPU_Z80 | CPU_AUDIO_CPU,
  542.             4000000,        /* 4 Mhz (?) */
  543.             sound_readmem,sound_writemem,0,0,
  544.             ignore_interrupt,0      /* IRQs are triggered by the YM2203 */
  545.         },
  546. #ifdef THIRD_CPU
  547.         {
  548.             CPU_Z80,
  549.             4000000,        /* 4 Mhz (?) */
  550.             readmem2,writemem2,0,0,
  551.             nmi_interrupt,1
  552.         }
  553. #endif
  554.     },
  555.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,  /* frames per second, vblank duration */
  556.     1,      /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  557.     0,
  558.  
  559.     /* video hardware */
  560.     64*8, 32*8, { 8*8, (64-8)*8-1, 2*8, 30*8-1 },
  561.     gfxdecodeinfo,
  562.     1024, 1024,
  563.     0,
  564.  
  565.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  566.     0,
  567.     sidearms_vh_start,
  568.     sidearms_vh_stop,
  569.     sidearms_vh_screenrefresh,
  570.  
  571.     /* sound hardware */
  572.     0,0,0,0,
  573.     {
  574.         {
  575.             SOUND_YM2203,
  576.             &ym2203_interface
  577.         }
  578.     }
  579. };
  580.  
  581. static struct MachineDriver machine_driver_turtship =
  582. {
  583.     /* basic machine hardware */
  584.     {
  585.         {
  586.             CPU_Z80,
  587.             4000000,        /* 4 Mhz (?) */
  588.             turtship_readmem,turtship_writemem,0,0,
  589.             interrupt,1
  590.         },
  591.         {
  592.             CPU_Z80 | CPU_AUDIO_CPU,
  593.             4000000,        /* 4 Mhz (?) */
  594.             sound_readmem,sound_writemem,0,0,
  595.             ignore_interrupt,0      /* IRQs are triggered by the YM2203 */
  596.         },
  597.     },
  598.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,  /* frames per second, vblank duration */
  599.     1,      /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  600.     0,
  601.  
  602.     /* video hardware */
  603.     64*8, 32*8, { 8*8, (64-8)*8-1, 2*8, 30*8-1 },
  604.     turtship_gfxdecodeinfo,
  605.     1024, 1024,
  606.     0,
  607.  
  608.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  609.     0,
  610.     sidearms_vh_start,
  611.     sidearms_vh_stop,
  612.     sidearms_vh_screenrefresh,
  613.  
  614.     /* sound hardware */
  615.     0,0,0,0,
  616.     {
  617.         {
  618.             SOUND_YM2203,
  619.             &ym2203_interface
  620.         }
  621.     }
  622. };
  623.  
  624.  
  625. ROM_START( sidearms )
  626.     ROM_REGION( 0x20000, REGION_CPU1 )     /* 64k for code + banked ROMs images */
  627.     ROM_LOAD( "sa03.bin",     0x00000, 0x08000, 0xe10fe6a0 )        /* CODE */
  628.     ROM_LOAD( "a_14e.rom",    0x10000, 0x08000, 0x4925ed03 )        /* 0+1 */
  629.     ROM_LOAD( "a_12e.rom",    0x18000, 0x08000, 0x81d0ece7 )        /* 2+3 */
  630.  
  631.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the audio CPU */
  632.     ROM_LOAD( "a_04k.rom",    0x0000, 0x8000, 0x34efe2d2 )
  633.  
  634.     ROM_REGION( 0x10000, REGION_CPU3 )    /* unknown, looks like Z80 code */
  635.     ROM_LOAD( "b_11j.rom",    0x0000, 0x8000, 0x134dc35b )
  636.  
  637.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  638.     ROM_LOAD( "a_10j.rom",    0x00000, 0x4000, 0x651fef75 ) /* characters */
  639.  
  640.     ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  641.     ROM_LOAD( "b_13d.rom",    0x00000, 0x8000, 0x3c59afe1 ) /* tiles */
  642.     ROM_LOAD( "b_13e.rom",    0x08000, 0x8000, 0x64bc3b77 )
  643.     ROM_LOAD( "b_13f.rom",    0x10000, 0x8000, 0xe6bcea6f )
  644.     ROM_LOAD( "b_13g.rom",    0x18000, 0x8000, 0xc71a3053 )
  645.     ROM_LOAD( "b_14d.rom",    0x20000, 0x8000, 0x826e8a97 )
  646.     ROM_LOAD( "b_14e.rom",    0x28000, 0x8000, 0x6cfc02a4 )
  647.     ROM_LOAD( "b_14f.rom",    0x30000, 0x8000, 0x9b9f6730 )
  648.     ROM_LOAD( "b_14g.rom",    0x38000, 0x8000, 0xef6af630 )
  649.  
  650.     ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  651.     ROM_LOAD( "b_11b.rom",    0x00000, 0x8000, 0xeb6f278c ) /* sprites */
  652.     ROM_LOAD( "b_13b.rom",    0x08000, 0x8000, 0xe91b4014 )
  653.     ROM_LOAD( "b_11a.rom",    0x10000, 0x8000, 0x2822c522 )
  654.     ROM_LOAD( "b_13a.rom",    0x18000, 0x8000, 0x3e8a9f75 )
  655.     ROM_LOAD( "b_12b.rom",    0x20000, 0x8000, 0x86e43eda )
  656.     ROM_LOAD( "b_14b.rom",    0x28000, 0x8000, 0x076e92d1 )
  657.     ROM_LOAD( "b_12a.rom",    0x30000, 0x8000, 0xce107f3c )
  658.     ROM_LOAD( "b_14a.rom",    0x38000, 0x8000, 0xdba06076 )
  659.  
  660.     ROM_REGION( 0x08000, REGION_GFX4 )    /* background tilemaps */
  661.     ROM_LOAD( "b_03d.rom",    0x0000, 0x8000, 0x6f348008 )
  662. ROM_END
  663.  
  664. ROM_START( sidearmr )
  665.     ROM_REGION( 0x20000, REGION_CPU1 )     /* 64k for code + banked ROMs images */
  666.     ROM_LOAD( "03",           0x00000, 0x08000, 0x9a799c45 )        /* CODE */
  667.     ROM_LOAD( "a_14e.rom",    0x10000, 0x08000, 0x4925ed03 )        /* 0+1 */
  668.     ROM_LOAD( "a_12e.rom",    0x18000, 0x08000, 0x81d0ece7 )        /* 2+3 */
  669.  
  670.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the audio CPU */
  671.     ROM_LOAD( "a_04k.rom",    0x0000, 0x8000, 0x34efe2d2 )
  672.  
  673.     ROM_REGION( 0x10000, REGION_CPU3 )    /* unknown, looks like Z80 code */
  674.     ROM_LOAD( "b_11j.rom",    0x0000, 0x8000, 0x134dc35b )
  675.  
  676.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  677.     ROM_LOAD( "a_10j.rom",    0x00000, 0x4000, 0x651fef75 ) /* characters */
  678.  
  679.     ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  680.     ROM_LOAD( "b_13d.rom",    0x00000, 0x8000, 0x3c59afe1 ) /* tiles */
  681.     ROM_LOAD( "b_13e.rom",    0x08000, 0x8000, 0x64bc3b77 )
  682.     ROM_LOAD( "b_13f.rom",    0x10000, 0x8000, 0xe6bcea6f )
  683.     ROM_LOAD( "b_13g.rom",    0x18000, 0x8000, 0xc71a3053 )
  684.     ROM_LOAD( "b_14d.rom",    0x20000, 0x8000, 0x826e8a97 )
  685.     ROM_LOAD( "b_14e.rom",    0x28000, 0x8000, 0x6cfc02a4 )
  686.     ROM_LOAD( "b_14f.rom",    0x30000, 0x8000, 0x9b9f6730 )
  687.     ROM_LOAD( "b_14g.rom",    0x38000, 0x8000, 0xef6af630 )
  688.  
  689.     ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  690.     ROM_LOAD( "b_11b.rom",    0x00000, 0x8000, 0xeb6f278c ) /* sprites */
  691.     ROM_LOAD( "b_13b.rom",    0x08000, 0x8000, 0xe91b4014 )
  692.     ROM_LOAD( "b_11a.rom",    0x10000, 0x8000, 0x2822c522 )
  693.     ROM_LOAD( "b_13a.rom",    0x18000, 0x8000, 0x3e8a9f75 )
  694.     ROM_LOAD( "b_12b.rom",    0x20000, 0x8000, 0x86e43eda )
  695.     ROM_LOAD( "b_14b.rom",    0x28000, 0x8000, 0x076e92d1 )
  696.     ROM_LOAD( "b_12a.rom",    0x30000, 0x8000, 0xce107f3c )
  697.     ROM_LOAD( "b_14a.rom",    0x38000, 0x8000, 0xdba06076 )
  698.  
  699.     ROM_REGION( 0x08000, REGION_GFX4 )    /* background tilemaps */
  700.     ROM_LOAD( "b_03d.rom",    0x0000, 0x8000, 0x6f348008 )
  701. ROM_END
  702.  
  703. ROM_START( sidearjp )
  704.     ROM_REGION( 0x20000, REGION_CPU1 )     /* 64k for code + banked ROMs images */
  705.     ROM_LOAD( "a_15e.rom",    0x00000, 0x08000, 0x61ceb0cc )        /* CODE */
  706.     ROM_LOAD( "a_14e.rom",    0x10000, 0x08000, 0x4925ed03 )        /* 0+1 */
  707.     ROM_LOAD( "a_12e.rom",    0x18000, 0x08000, 0x81d0ece7 )        /* 2+3 */
  708.  
  709.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the audio CPU */
  710.     ROM_LOAD( "a_04k.rom",    0x0000, 0x8000, 0x34efe2d2 )
  711.  
  712.     ROM_REGION( 0x10000, REGION_CPU3 )    /* unknown, looks like Z80 code */
  713.     ROM_LOAD( "b_11j.rom",    0x0000, 0x8000, 0x134dc35b )
  714.  
  715.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  716.     ROM_LOAD( "a_10j.rom",    0x00000, 0x4000, 0x651fef75 ) /* characters */
  717.  
  718.     ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  719.     ROM_LOAD( "b_13d.rom",    0x00000, 0x8000, 0x3c59afe1 ) /* tiles */
  720.     ROM_LOAD( "b_13e.rom",    0x08000, 0x8000, 0x64bc3b77 )
  721.     ROM_LOAD( "b_13f.rom",    0x10000, 0x8000, 0xe6bcea6f )
  722.     ROM_LOAD( "b_13g.rom",    0x18000, 0x8000, 0xc71a3053 )
  723.     ROM_LOAD( "b_14d.rom",    0x20000, 0x8000, 0x826e8a97 )
  724.     ROM_LOAD( "b_14e.rom",    0x28000, 0x8000, 0x6cfc02a4 )
  725.     ROM_LOAD( "b_14f.rom",    0x30000, 0x8000, 0x9b9f6730 )
  726.     ROM_LOAD( "b_14g.rom",    0x38000, 0x8000, 0xef6af630 )
  727.  
  728.     ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  729.     ROM_LOAD( "b_11b.rom",    0x00000, 0x8000, 0xeb6f278c ) /* sprites */
  730.     ROM_LOAD( "b_13b.rom",    0x08000, 0x8000, 0xe91b4014 )
  731.     ROM_LOAD( "b_11a.rom",    0x10000, 0x8000, 0x2822c522 )
  732.     ROM_LOAD( "b_13a.rom",    0x18000, 0x8000, 0x3e8a9f75 )
  733.     ROM_LOAD( "b_12b.rom",    0x20000, 0x8000, 0x86e43eda )
  734.     ROM_LOAD( "b_14b.rom",    0x28000, 0x8000, 0x076e92d1 )
  735.     ROM_LOAD( "b_12a.rom",    0x30000, 0x8000, 0xce107f3c )
  736.     ROM_LOAD( "b_14a.rom",    0x38000, 0x8000, 0xdba06076 )
  737.  
  738.     ROM_REGION( 0x08000, REGION_GFX4 )    /* background tilemaps */
  739.     ROM_LOAD( "b_03d.rom",    0x0000, 0x8000, 0x6f348008 )
  740. ROM_END
  741.  
  742. ROM_START( turtship )
  743.     ROM_REGION( 0x20000, REGION_CPU1 )     /* 64k for code + banked ROMs images */
  744.     ROM_LOAD( "turtship.003",    0x00000, 0x08000, 0xe7a7fc2e )
  745.     ROM_LOAD( "turtship.002",    0x10000, 0x08000, 0xe576f482 )
  746.     ROM_LOAD( "turtship.001",    0x18000, 0x08000, 0xa9b64240 )
  747.  
  748.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the audio CPU */
  749.     ROM_LOAD( "turtship.004",    0x0000, 0x8000, 0x1cbe48e8 )
  750.  
  751.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  752.     ROM_LOAD( "turtship.005",    0x00000, 0x04000, 0x651fef75 )    /* characters */
  753.  
  754.     ROM_REGION( 0x60000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  755.     ROM_LOAD( "turtship.008",    0x00000, 0x10000, 0xe0658469 )    /* tiles */
  756.     ROM_LOAD( "turtship.010",    0x10000, 0x10000, 0x76bb73bb )
  757.     ROM_LOAD( "turtship.011",    0x20000, 0x10000, 0x53da6cb1 )
  758.     ROM_LOAD( "turtship.006",    0x30000, 0x10000, 0xa7cce654 )
  759.     ROM_LOAD( "turtship.007",    0x40000, 0x10000, 0x3ccf11b9 )
  760.     ROM_LOAD( "turtship.009",    0x50000, 0x10000, 0x44762916 )
  761.  
  762.     ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  763.     ROM_LOAD( "turtship.013",    0x00000, 0x10000, 0x599f5246 )    /* sprites */
  764.     ROM_LOAD( "turtship.015",    0x10000, 0x10000, 0x69fd202f )
  765.     ROM_LOAD( "turtship.012",    0x20000, 0x10000, 0xfb54cd33 )
  766.     ROM_LOAD( "turtship.014",    0x30000, 0x10000, 0xb3ea74a3 )
  767.  
  768.     ROM_REGION( 0x08000, REGION_GFX4 )    /* background tilemaps */
  769.     ROM_LOAD( "turtship.016",    0x0000, 0x8000, 0xaffd51dd )
  770. ROM_END
  771.  
  772. ROM_START( dyger )
  773.     ROM_REGION( 0x20000, REGION_CPU1 )     /* 64k for code + banked ROMs images */
  774.     ROM_LOAD( "dyger.003",    0x00000, 0x08000, 0xbae9882e )
  775.     ROM_LOAD( "dyger.002",    0x10000, 0x08000, 0x059ac4dc )
  776.     ROM_LOAD( "dyger.001",    0x18000, 0x08000, 0xd8440f66 )
  777.  
  778.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the audio CPU */
  779.     ROM_LOAD( "dyger.004",    0x0000, 0x8000, 0x8a256c09 )
  780.  
  781.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  782.     ROM_LOAD( "dyger.005",    0x00000, 0x04000, 0xc4bc72a5 )    /* characters */
  783.     ROM_CONTINUE(             0x00000, 0x04000 )    /* is the first half used? */
  784.  
  785.     ROM_REGION( 0x60000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  786.     ROM_LOAD( "dyger.010",    0x00000, 0x10000, 0x9715880d )    /* tiles */
  787.     ROM_LOAD( "dyger.009",    0x10000, 0x10000, 0x628dae72 )
  788.     ROM_LOAD( "dyger.011",    0x20000, 0x10000, 0x23248db1 )
  789.     ROM_LOAD( "dyger.006",    0x30000, 0x10000, 0x4ba7a437 )
  790.     ROM_LOAD( "dyger.008",    0x40000, 0x10000, 0x6c0f0e0c )
  791.     ROM_LOAD( "dyger.007",    0x50000, 0x10000, 0x2c50a229 )
  792.  
  793.     ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  794.     ROM_LOAD( "dyger.014",    0x00000, 0x10000, 0x99c60b26 )    /* sprites */
  795.     ROM_LOAD( "dyger.015",    0x10000, 0x10000, 0xd6475ecc )
  796.     ROM_LOAD( "dyger.012",    0x20000, 0x10000, 0xe345705f )
  797.     ROM_LOAD( "dyger.013",    0x30000, 0x10000, 0xfaf4be3a )
  798.  
  799.     ROM_REGION( 0x08000, REGION_GFX4 )    /* background tilemaps */
  800.     ROM_LOAD( "dyger.016",    0x0000, 0x8000, 0x0792e8f2 )
  801. ROM_END
  802.  
  803. ROM_START( dygera )
  804.     ROM_REGION( 0x20000, REGION_CPU1 )     /* 64k for code + banked ROMs images */
  805.     ROM_LOAD( "dygar_t3.bin", 0x00000, 0x08000, 0xfc63da8b )
  806.     ROM_LOAD( "dyger.002",    0x10000, 0x08000, 0x059ac4dc )
  807.     ROM_LOAD( "dyger.001",    0x18000, 0x08000, 0xd8440f66 )
  808.  
  809.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the audio CPU */
  810.     ROM_LOAD( "dyger.004",    0x0000, 0x8000, 0x8a256c09 )
  811.  
  812.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  813.     ROM_LOAD( "dyger.005",    0x00000, 0x04000, 0xc4bc72a5 )    /* characters */
  814.     ROM_CONTINUE(             0x00000, 0x04000 )    /* is the first half used? */
  815.  
  816.     ROM_REGION( 0x60000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  817.     ROM_LOAD( "dyger.010",    0x00000, 0x10000, 0x9715880d )    /* tiles */
  818.     ROM_LOAD( "dyger.009",    0x10000, 0x10000, 0x628dae72 )
  819.     ROM_LOAD( "dyger.011",    0x20000, 0x10000, 0x23248db1 )
  820.     ROM_LOAD( "dyger.006",    0x30000, 0x10000, 0x4ba7a437 )
  821.     ROM_LOAD( "dyger.008",    0x40000, 0x10000, 0x6c0f0e0c )
  822.     ROM_LOAD( "dyger.007",    0x50000, 0x10000, 0x2c50a229 )
  823.  
  824.     ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  825.     ROM_LOAD( "dyger.014",    0x00000, 0x10000, 0x99c60b26 )    /* sprites */
  826.     ROM_LOAD( "dyger.015",    0x10000, 0x10000, 0xd6475ecc )
  827.     ROM_LOAD( "dyger.012",    0x20000, 0x10000, 0xe345705f )
  828.     ROM_LOAD( "dyger.013",    0x30000, 0x10000, 0xfaf4be3a )
  829.  
  830.     ROM_REGION( 0x08000, REGION_GFX4 )    /* background tilemaps */
  831.     ROM_LOAD( "dyger.016",    0x0000, 0x8000, 0x0792e8f2 )
  832. ROM_END
  833.  
  834.  
  835.  
  836. GAMEX( 1986, sidearms, 0,        sidearms, sidearms, 0, ROT0,   "Capcom", "Side Arms - Hyper Dyne (World)", GAME_NO_COCKTAIL )
  837. GAMEX( 1988, sidearmr, sidearms, sidearms, sidearms, 0, ROT0,   "Capcom (Romstar license)", "Side Arms - Hyper Dyne (US)", GAME_NO_COCKTAIL )
  838. GAMEX( 1986, sidearjp, sidearms, sidearms, sidearms, 0, ROT0,   "Capcom", "Side Arms - Hyper Dyne (Japan)", GAME_NO_COCKTAIL )
  839. GAMEX( 1988, turtship, 0,        turtship, turtship, 0, ROT0,   "Philko", "Turtle Ship", GAME_NO_COCKTAIL )
  840. GAMEX( 1989, dyger,    0,        turtship, dyger,    0, ROT270, "Philko", "Dyger (set 1)", GAME_NO_COCKTAIL )
  841. GAMEX( 1989, dygera,   dyger,    turtship, dyger,    0, ROT270, "Philko", "Dyger (set 2)", GAME_NO_COCKTAIL )
  842.